import 'package:flutter/material.dart';

class JumpPageUtils {
  /// 跳转到下一个界面
  static void startNext(BuildContext context, String route) {
    Navigator.pushNamed(context, route);
  }

  /// 跳转到下一个界面
  static void startNextWidget(BuildContext context, Widget page) {
    Navigator.of(context).push(
      MaterialPageRoute(
        builder: (_) {
          return page;
        },
      ),
    );
  }

  ///关闭界面
  static void clostPage(BuildContext context) {
    Navigator.pop(context);
  }

  ///关闭对话框
  static void closeDialog(BuildContext context) {
    Navigator.of(context).pop(1);
  }
}
